There's a bunch of logging bits we need to find out what happened in `#5294`, the first of which is logging as we are used to for Rails itself. Turns out we were already logging but the log lines weren't displayed. That's because workers have no access to the Rails logger unless we hack things a bit in the config/initializer. If we want to keep DJ's logs in a different file, which I think is good for debugging purposes, we need to diverge from Rails.logger. However, there's no access to Delayed::Worker.logger in custom job classes either so there's no way other than mimicking that logger's format if we want log lines to be consistent. Now the current logs will see the light like: ``` 2020-05-07T14:09:42+0000: [Worker(host:8dc5e7e6f434 pid:1)] Job SubscriptionPlacementJob (id=54) RUNNING 2020-05-07T14:09:42+0000: Placing Order for Proxy Order 1 2020-05-07T14:09:42+0000: Issue in Subscription Order 2: complete 2020-05-07T14:09:42+0000: Placing Order for Proxy Order 7 2020-05-07T14:09:42+0000: Issue in Subscription Order 3: complete 2020-05-07T14:09:43+0000: [Worker(host:8dc5e7e6f434 pid:1)] Job SubscriptionPlacementJob (id=54) COMPLETED after 0.3378 2020-05-07T14:09:43+0000: [Worker(host:8dc5e7e6f434 pid:1)] 1 jobs processed at 2.8054 j/s, 0 failed ``` We'll see if we need to format these messages differently to make them more greppeable.
Open Food Network
The Open Food Network is an online marketplace for local food. It enables a network of independent online food stores that connects farmers and food hubs (including co-ops, online farmers markets, independent food businesses, etc) with individuals and local businesses. It gives farmers and food hubs an easier and fairer way to distribute their food.
Supported by the Open Food Foundation and a network of global affiliates, we are proudly open source and not-for-profit - we're trying to seriously disrupt the concentration of power in global agri-food systems, and we need as many smart people working together on this as possible.
We're part of global movement - get involved!
- Join the conversation on Slack. Make sure you introduce yourself in the #general channel.
- Head to https://openfoodnetwork.org for more information about the global OFN project.
- Check out the User Guide for a list of features and tutorials.
- Join our discussion forum.
Contributing
If you are interested in contributing to the OFN in any capacity, please introduce yourself on Slack, and have a look through our Contributor Guide.
Our GETTING_STARTED and CONTRIBUTING guides are the best place to start for developers looking to set up a development environment and make contributions to the codebase.
Provisioning
If you're interested in provisioning a server, see ofn-install for the project's Ansible playbooks.
We also have a Super Admin Guide to help with configuration of new servers.
Testing
We use BrowserStack as a manual testing tool. BrowserStack provides open source projects with unlimited and free of charge accounts. A big thanks to them!
Licence
Copyright (c) 2012 - 2020 Open Food Foundation, released under the AGPL licence.
