Skip to content

Commit

Permalink
Merge pull request #45 from almenscorner/dev
Browse files Browse the repository at this point in the history
v2.1.3
  • Loading branch information
almenscorner authored Sep 6, 2024
2 parents ff3347a + e9b199a commit e406e81
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
task_track_started=True,
),
)
app.config["APP_VERSION"] = "2.1.0"
app.config["APP_VERSION"] = "2.1.3"
app.config["APISPEC_SWAGGER_UI_URL"] = "/apidocs"
app.config["APISPEC_TITLE"] = "IntuneCD Monitor API Docs"

Expand Down
6 changes: 6 additions & 0 deletions app/app_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@
else:
PERMANENT_SESSION_LIFETIME = timedelta(hours=3)

DOCUMENTATION_MAX_LENGTH = os.getenv("DOCUMENTATION_MAX_LENGTH")
if DOCUMENTATION_MAX_LENGTH:
DOCUMENTATION_MAX_LENGTH = int(DOCUMENTATION_MAX_LENGTH)
else:
DOCUMENTATION_MAX_LENGTH = None

SQLALCHEMY_DATABASE_URI = "mssql+pyodbc:///?odbc_connect=%s" % params
SQLALCHEMY_ENGINE_OPTIONS = {"pool_pre_ping": True}
AUTHORITY = f"https://login.microsoftonline.com/{AZURE_TENANT_ID}"
Expand Down
7 changes: 6 additions & 1 deletion app/run_intunecd.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ def create_documentation(PATH, TENANT) -> None:
PATH (str): path to the repository
TENANT (object): tenant object
"""

cmd = [
"IntuneCD-startdocumentation",
"-c",
Expand All @@ -127,6 +128,10 @@ def create_documentation(PATH, TENANT) -> None:
"-t",
TENANT.name,
]

if app_config.DOCUMENTATION_MAX_LENGTH:
cmd += ["-m", app_config.DOCUMENTATION_MAX_LENGTH]

cmd = " ".join(cmd)

emit_message("Creating documentation...", "running", "backup", TENANT.id, socket)
Expand Down Expand Up @@ -319,7 +324,7 @@ def run_intunecd_update(TENANT_ID) -> dict:
}


@shared_task(time_limit=3600, soft_time_limit=3000)
@shared_task(time_limit=7200, soft_time_limit=6600)
def run_intunecd_backup(TENANT_ID, NEW_BRANCH=None) -> dict:
"""Runs the IntuneCD-startbackup command for the specified tenant.
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ h11==0.14.0
idna==3.6
Jinja2==3.1.3
MarkupSafe==2.1.5
msal==1.27.0
msal==1.30.0
pycparser==2.21
PyJWT==2.8.0
requests==2.31.0
Expand All @@ -28,7 +28,7 @@ Werkzeug==3.0.1
wsproto==1.2.0
python-dateutil==2.9.0.post0
azure-storage-blob==12.19.0
IntuneCD==2.3.3
IntuneCD==2.3.6
flask-migrate==4.0.7
gitpython==3.1.42
azure-identity==1.15.0
Expand Down

0 comments on commit e406e81

Please sign in to comment.