You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an Action constructor is invoked, it should build (from scratch) and maintain its own connection to the database. This will furthermore ensure that child processes do not accidentally inherit the parent's database descriptor.
The text was updated successfully, but these errors were encountered:
This issue is on hold: part of the problem is that the Actions need to be constructed in order to use their getNextAttempt() method to determine when to fire them, but doing so also initializes a database connection (if it's in the constructor) before the child process has been spawned for the Action, thereby creating the problem this ticket was meant to address.
For the time being, the fix is to add the following line to the start of every Action's run() method:
if (!isset($this->db)) { $this->db = Storage::getDatabase(); }
This needs to be refactored in such a way that the database descriptor is only created when the action fires, since the action is assigned a new child process every time it runs. With the descriptor built in the constructor, it would only work once until the second time the action is called and spun off into a child process.
When an Action constructor is invoked, it should build (from scratch) and maintain its own connection to the database. This will furthermore ensure that child processes do not accidentally inherit the parent's database descriptor.
The text was updated successfully, but these errors were encountered: