ismop / dap

3 stars 0 forks source link

Update august experiment interval and water wave #152

Closed mkasztelnik closed 8 years ago

mkasztelnik commented 8 years ago

Previous experiment was skipped due to technical levee problems. Current changes are connected with new experiment concept which already took place.

Experiment changes are already applied into prod and dev dap.

nowakowski commented 8 years ago

@mkasztelnik I tend to follow a general rule that all custom rake tasks should be idempotent. This is to avoid trashing the production DB in case of multiple invocations (which happens surprisingly often). Please consider the following:

nowakowski commented 8 years ago

@mkasztelnik What's the status of this PR?

mkasztelnik commented 8 years ago

According to our f2f conversation you said that you will do polishing and merging. Additionally (in another PR) I propose to create dedicated function allowing to create water wave, eg. something like:

create_experiment(name: "Experiment n", from: Time.now, to: Time.now + 70.hours,
                               Function.new(from: 0.0, to: 4.0, interval: 24.hours), # up
                               Function.new(from: 4.0, to: 4.0, interval: 10.hours), # plato
                               Function.new(from: 4.0, to: 0.0, interval: 36.hours)) # down

This method can check if experiment with given name already exists. It yes than existing water wave is deleted and new one is generated. I can help in implementing this method next week.

nowakowski commented 8 years ago

Right - sorry; I forgot about that convo. :)