teste
This commit is contained in:
1 parent
708c2843d1
commit
9a92ba9d10
126 files changed
+353160
-271425
No files matched your search
@@ -5,10 +5,10 @@ from flask_cors import CORS
|
||||
from werkzeug.utils import secure_filename
|
||||
|
||||
# Importa suas funções e configurações existentes
|
||||
from main import process_single_file, rebuild_indexes
|
||||
from main import process_single_file, rebuild_indexes, generate_manifests
|
||||
|
||||
# 2. ADICIONE BASE_PATH ABAIXO (Assume que utils tem o caminho raiz do projeto)
|
||||
from utils import MMP_FOLDER, MMPZ_FOLDER, CERT_PATH, KEY_PATH, BASE_PATH
|
||||
from utils import MMP_FOLDER, MMPZ_FOLDER, CERT_PATH, KEY_PATH, BASE_DATA, SRC_MMPSEARCH
|
||||
|
||||
app = Flask(__name__)
|
||||
CORS(app)
|
||||
@@ -32,13 +32,13 @@ def run_jekyll_build():
|
||||
"jekyll",
|
||||
"build",
|
||||
"--destination",
|
||||
"/nethome/jotachina/public_html/mmpSearch/",
|
||||
"/var/www/html/trens/mmpSearch/",
|
||||
]
|
||||
|
||||
try:
|
||||
# cwd=BASE_PATH garante que o comando rode na pasta onde está o Gemfile
|
||||
result = subprocess.run(
|
||||
command, check=True, cwd=BASE_PATH, capture_output=True, text=True
|
||||
command, check=True, cwd=BASE_DATA, capture_output=True, text=True
|
||||
)
|
||||
print("Jekyll Build Sucesso!")
|
||||
print(result.stdout) # Opcional: ver log do jekyll
|
||||
@@ -84,6 +84,11 @@ def upload_file():
|
||||
# Só roda se o processamento e o indice derem certo
|
||||
run_jekyll_build()
|
||||
# -----------------------------
|
||||
# Geração de Manifestos
|
||||
try:
|
||||
manifest_report = generate_manifests(SRC_MMPSEARCH)
|
||||
except Exception as e:
|
||||
manifest_report = {"generated": [], "failed": [str(e)]}
|
||||
|
||||
return jsonify(
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user