Persistence: Saving and Loading Data ==================================== These functions can be imported from the ``ppc_robot_lib.reporting.persistence`` module. .. contents:: :local: :backlinks: none Job Storage ----------- Each job has a private storage. You can save arbitrary objects to this storage and load them in the subsequent runs of the same job. Each object is identified by a key. Key is a string from any characters that can be used in a valid file path. The storage is isolated and private for each job. Example: we have a task type called `product_dsa_generator`. When this task type finishes, it stores its state into an object with key ``state``. This object is loaded in the subsequent runs. User creates two jobs: Job A for account A, and Job B for account B. The user runs Job A, and when it is done, it stores its state. Afterwards, the user runs Job B. However, this job does not load state previously stored by Job A, because the storage of each job is isolated. Instead, it will create its own state and stores it in its own storage. .. autofunction:: ppc_robot_lib.reporting.persistence.job_storage.save_job_object .. autofunction:: ppc_robot_lib.reporting.persistence.job_storage.save_job_dataframe .. autofunction:: ppc_robot_lib.reporting.persistence.job_storage.load_job_object .. autofunction:: ppc_robot_lib.reporting.persistence.job_storage.load_job_dataframe