During development, there are two modifications which sometimes have to applied to the MoodleDataProxyService. Specifically, this concerns the log level and the initial timestamp for receiving updates. In order to avoid a rebuilt of the current image where these things are adjusted, environment variables may be used to provide these options.
Specification
Log level
There are two different ways to achieve a higher log level, both of them could for example be implemented using sed.
Change this line to adjust the log level in the logger directly.
Changing the log level of the respective messages (see e.g., this line). This option is preferable, as there are a lot of superfluous messages on the INFO level logged by the blockchain.
Initial timestamp
In order to get course upgrades, the Moodle API is polled once a minute which is achieved by filtering Moodle update events by their timestamp. The timestamp used in the initial request to the Moodle API is set here. In case some update events were lost, it can be useful to adjust this timestamp. Again there are two different approaches which could be implemented using sed.
Add a binary variable, to either get all updates (set timestamp to 0), or just get latest (set timestamp to current)
Add a free variable to adjust the timestamp (e.g., the variable is the epoch timestamp)
Finalized state
The image should still be the same as it currently is, however with two new environment variables to adjust:
the log level
the timestamp for the initial call to Moodle to get update events
Furthermore, the launch variables section have to be updated in general, and once the above mentioned changes have been implemented should reflect these, too.
Motivation
During development, there are two modifications which sometimes have to applied to the MoodleDataProxyService. Specifically, this concerns the log level and the initial timestamp for receiving updates. In order to avoid a rebuilt of the current image where these things are adjusted, environment variables may be used to provide these options.
Specification
Log level
There are two different ways to achieve a higher log level, both of them could for example be implemented using sed.
Initial timestamp
In order to get course upgrades, the Moodle API is polled once a minute which is achieved by filtering Moodle update events by their timestamp. The timestamp used in the initial request to the Moodle API is set here. In case some update events were lost, it can be useful to adjust this timestamp. Again there are two different approaches which could be implemented using sed.
Finalized state
The image should still be the same as it currently is, however with two new environment variables to adjust:
Furthermore, the launch variables section have to be updated in general, and once the above mentioned changes have been implemented should reflect these, too.