We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm just looking around and learning with @intermittentnrg use cases, and it seems a useful scenario:
https://github.com/intermittentnrg/intermittent-importers/blob/d2bb428afc85c05d0e62efd12b53a685b2615c11/app/models/generation_unit.rb#L7-L16
def self.enable_compression_policy! connection.execute <<~SQL SELECT alter_job((SELECT job_id FROM timescaledb_information.jobs WHERE proc_name='policy_compression' AND hypertable_name = '#{self.table_name}'), scheduled => true); SQL end def self.disable_compression_policy! connection.execute <<~SQL SELECT alter_job((SELECT job_id FROM timescaledb_information.jobs WHERE proc_name='policy_compression' AND hypertable_name = '#{self.table_name}'), scheduled => false); SQL end
Which can also be translated as:
def self.enable_compression_policy! self.hypertable.jobs.compression.select("job_id").each(&:enable!) end
The method enable! can be implemented directly from the Job model, and we can have a few scenarios like:
enable!
Timescaledb.alter_job(job_id, **args) Job.find(job_id).alter_job(**args)
Then, on the job_level we can have:
def enable! alter_job(scheduled: true) end def disable! alter_job(scheduled: false) end
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm just looking around and learning with @intermittentnrg use cases, and it seems a useful scenario:
https://github.com/intermittentnrg/intermittent-importers/blob/d2bb428afc85c05d0e62efd12b53a685b2615c11/app/models/generation_unit.rb#L7-L16
Which can also be translated as:
The method
enable!
can be implemented directly from the Job model, and we can have a few scenarios like:Then, on the job_level we can have:
The text was updated successfully, but these errors were encountered: