This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# First approach | |
class A: | |
vadifier = None | |
def create(self, ...): | |
... | |
if self.vadifier: | |
self.vadifier.run(new_version) | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.test import TestCase | |
from pprint import pprint | |
from django.db import connection, reset_queries | |
from django.test.utils import override_settings | |
from pulpcore.plugin.models import Artifact, RemoteArtifact, ContentArtifact | |
from pulpcore.plugin.stages import ( | |
DeclarativeContent, | |
DeclarativeArtifact, | |
RemoteArtifactSaver, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import functools | |
import time | |
from contextlib import suppress | |
start_time = time.time() | |
def print_t(msg): | |
t = time.time() - start_time | |
print(f"{t:04.1f}: {msg}") |