Verified Commit 8d34ba9e authored by Alberto Miranda's avatar Alberto Miranda ♨️
Browse files

adhoc_storage_info: Add update(adhoc_storage::ctx)

parent 1408d4f2
Loading
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -73,6 +73,11 @@ struct adhoc_storage_info {
        return m_adhoc_storage;
        return m_adhoc_storage;
    }
    }


    void
    update(admire::adhoc_storage::ctx adhoc_context) {
        m_adhoc_storage.update(std::move(adhoc_context));
    }

    admire::error_code
    admire::error_code
    add_client_info(std::shared_ptr<admire::internal::job_info> job_info) {
    add_client_info(std::shared_ptr<admire::internal::job_info> job_info) {


+1 −5
Original line number Original line Diff line number Diff line
@@ -75,12 +75,8 @@ struct adhoc_storage_manager : scord::utils::singleton<adhoc_storage_manager> {


        if(const auto it = m_adhoc_storages.find(id);
        if(const auto it = m_adhoc_storages.find(id);
           it != m_adhoc_storages.end()) {
           it != m_adhoc_storages.end()) {

            const auto current_adhoc_info = it->second;
            const auto current_adhoc_info = it->second;
            auto tmp_adhoc = current_adhoc_info->adhoc_storage();
            current_adhoc_info->update(std::move(new_ctx));
            tmp_adhoc.update(std::move(new_ctx));

            *it->second = admire::internal::adhoc_storage_info{tmp_adhoc};
            return ADM_SUCCESS;
            return ADM_SUCCESS;
        }
        }